import request from "./requests";

// 新增模板
export const addTemplate = (data) => {
  return request({
    url: "/api/apift/casezy_add_form_template",
	contentType:"application/json",
    data: data,
  });
}
// 編輯模板
export const editTemplate = (data) => {
  return request({
    url: "/api/apift/edit_form_template",
	contentType:"application/json",
    data: data,
  });
}
// 獲取模板詳情
export const getFormTemplateDetail = (data) => {
  return request({
    url: "/api/apift/detail_casezy_form_template",
    data: data,
  });
}
// 檢查表庫編輯的時候獲取的詳情
export const getDetailFormTemplateDetail = (data) => {
  return request({
    url: "/api/apift/detail_form_template",
    data: data,
  });
}
// 獲取檢查表庫模板詳情
export const getTemplateDetail = (data) => {
  return request({
    url: "/api/apift/detail_form_template",
    data: data,
  });
}
// 删除模版
export const deleteTemplate = (data) => {
  return request({
    url: "/api/apift/delete_form_template",
    data: data,
  });
}
// 分頁獲取列表
export const getTemList = (data) => {
  return request({
    url: "/api/apift/get_page_list_form_template",
    data: data,
  });
}
// 獲取模板下拉
export const getFormTemList = (data) => {
  return request({
    url: "/api/apift/casezy_get_list_form_template",
    data: data,
  });
}
// 通過選區檢查表添加
export const addCasezyTemplate = (data) => {
  return request({
    url: "/api/apift/add_casezy_form_template",
    data: data,
  });
}

// 通過選區檢查表添加
export const deleteTem = (data) => {
  return request({
    url: "/api/apift/delete_casezy_form_template",
    data: data,
  });
}

// 提交答題
export const addResult = (data) => {
  return request({
    url: "/api/apift/add_casezy_form_template_result",
	contentType:"application/json",
    data: data,
  });
}

// 查看答案詳情
export const  getTemplateResult= (data) => {
  return request({
    url: "/api/apift/detail_casezy_form_template_result",
	contentType:"application/json",
    data: data,
  });
}
// 导出pdf
export const  getTemplatePdf= (data) => {
  return request({
    url: "/api/apift/export_pdf_casezy_form_template_result",
    data: data,
  });
}

// 刪除已作答的檢查表
export const  deleteResult= (data) => {
  return request({
    url: "/api/apift/del_casezy_form_template_result",
    data: data,
  });	
}

//新增模塊片段
export const addModule = (data) => {
  return request({
    url: "/api/apift/add_form_template_module",
	contentType:"application/json",
    data: data,
  });
}

//分頁獲取模版片段列表
export const getModuleList = (data) => {
  return request({
    url: "/api/apift/get_page_list_form_template_module",
    data: data,
  });
}
//獲取模塊片段詳情
export const getModuleDetail = (data) => {
  return request({
    url: "/api/apift/detail_form_template_module",
    data: data,
  });
}
//刪除模塊片段
export const deleteModule = (data) => {
  return request({
    url: "/api/apift/delete_form_template_module",
    data: data,
  });
}

//编辑模块
export const editModule = (data) => {
  return request({
    url: "/api/apift/edit_form_template_module",
	contentType:"application/json",
    data: data,
  });
}